<?php
namespace App\Services;

use Illuminate\Pagination\LengthAwarePaginator;

class RewritePaginate extends LengthAwarePaginator {
    public function toArray()
    {
        return [
            'code' => 0,
            'msg' => '',
            'count' => $this->total(),
            'data' => $this->items->toArray()
        ];
    }
}
